import { message, Modal } from "ant-design-vue";

export default (err:any) => {
    if(err instanceof TypeError) {
        Modal.error({
            title: '客户端错误',
            content: '详情信息请查看日志...',
            onOk() {
                Modal.destroyAll()
            }
        });
        console.error(err)
    } else {
        if(err.message && err.message !== ''){
            message.warning(err.message);
        }
    }
}
